package com.ruoyi.web.controller.wlsggk;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.waterdrop.wlsggk.pojo.DishSales;
import com.waterdrop.wlsggk.service.DishSalesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.List;

@RestController
@RequestMapping("/wlsggk/DishSales")
public class DishSalesController extends BaseController {

    @Autowired
    private DishSalesService dishSalesService;

    /**
     * 新增菜品销售订单
     */
/*    @PostMapping
    public AjaxResult add(@Validated @RequestBody WlsggkDishSales wlsggkDishSales) {
        return toAjax(wlsggkDishSalesService.insertWlsggkDishSales(wlsggkDishSales));
    }*/

    /**
     * 获取菜品销售订单列表
     */
    @GetMapping("/list")
    public TableDataInfo list(DishSales DishSales, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime) {
        startPage();
        List<com.waterdrop.wlsggk.pojo.DishSales> list = dishSalesService.selectDishSalesList(DishSales, startTime, endTime);
        return getDataTable(list);
    }

    /**
     * 删除菜品销售订单信息
     */
/*    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(wlsggkDishSalesService.deleteWlsggkDishSales(ids));
    }*/


}

